const mysql_query = require("../common/mysql");
const httpresult = require("../common/response");
const utils = require("../common/utils");
var define = require('../common/define');

async function del(bank_id) {
    let [error, data] = await mysql_query("delete from bank where bank_id = ?", [bank_id]);
    if (error) {
        return [error, null];
    }
    [error, data] = await mysql_query("delete from bank_question where bank_id = ?", [bank_id]);
    if (error) {
        return [error, null];
    }
    return [null, data];
}

async function get(bank_id) {
    return await mysql_query("select * from bank where bank_id = ?", [bank_id]);
}
exports.del = del;
exports.get = get;